//
//  MeViewController.m
//  WeiXin
//
//  Created by 亦心 on 15/12/7.
//  Copyright © 2015年 wwj. All rights reserved.
//

#import "MeViewController.h"
#import "SettingGroup.h"
#import "SettingArrowItem.h"
#import "MyProfileViewController.h"
#import "SettingViewController.h"

@interface MeViewController ()

@end

@implementation MeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
  
    [self addGroup];
    
    [self addGroup2];
    
    [self addGroup3];
    
    [self addGroup4];
    
}

-(void)addGroup{
    SettingGroup *group = [[SettingGroup alloc] init];
    SettingArrowItem *item = [SettingArrowItem initWithIcon:@"MoreMyFavorites" title:@"亦心" tagClass:[MyProfileViewController class]];
    __block SettingArrowItem *bItem = item;
    item.block = ^{
        bItem.title = @"个人信息";
    };
    group.items = @[item];
    [self.dataArray addObject:group];
}

-(void)addGroup2{
    SettingGroup *group = [[SettingGroup alloc] init];
    SettingArrowItem *item = [SettingArrowItem initWithIcon:@"MoreMyAlbum" title:@"MyPosts" tagClass:nil];
    SettingArrowItem *item2 = [SettingArrowItem initWithIcon:@"MoreMyFavorites" title:@"Favorites" tagClass:nil];
    SettingArrowItem *item3 = [SettingArrowItem initWithIcon:@"MoreMyBankCard" title:@"Wallet" tagClass:nil];
    group.items = @[item, item2, item3];
    [self.dataArray addObject:group];
}

-(void)addGroup3{
    SettingGroup *group = [[SettingGroup alloc] init];
    SettingArrowItem *item = [SettingArrowItem initWithIcon:@"MoreExpressionShops" title:@"Sticker Gallery" tagClass:nil];
    group.items = @[item];
    [self.dataArray addObject:group];
}

-(void)addGroup4{
    SettingGroup *group = [[SettingGroup alloc] init];
    SettingArrowItem *item = [SettingArrowItem initWithIcon:@"MoreSetting" title:@"Settings" tagClass:[SettingViewController class]];
    __block SettingItem *sItem = item;
    item.block = ^{
        sItem.title = @"设置";
    };
    group.items = @[item];
    [self.dataArray addObject:group];
}

@end
